Terrain · Relief · DEM Roughness

TRI – Topographic Ruggedness Index

The Topographic Ruggedness Index (TRI) quantifies how rough or rugged the terrain is by measuring the variation in elevation around each pixel. It is derived from a digital elevation model (DEM) and is useful for geomorphology, ecology, and hazard analysis.
مؤشر خشونة التضاريس TRI يقيس مدى وعورة أو تدرج السطح اعتمادًا على الاختلاف في المناسيب حول كل خلية في نموذج الارتفاع الرقمي (DEM)، ويُستخدم في دراسات الانحدار، الانهيارات، ملاءمة الموائل وغيرها.

1. Scientific Definition

Topographic Ruggedness Index (TRI) describes the amount of elevation difference between a central cell and its surrounding neighbours in a DEM. High TRI values indicate rugged, highly variable terrain (steep slopes, ridges, cliffs), while low TRI values indicate flat or gently rolling areas.

Conceptual Formula (Riley-style TRI)

TRI can be computed as the difference between the maximum and minimum elevation in a 3×3 window, or using more complex statistics (e.g. standard deviation of elevation):

TRI = max(Z3×3) − min(Z3×3) meters

  • Z – elevation values (m) from a DEM.
  • 3×3 window – neighbourhood around each pixel.

Example Interpretation (relative classes)

TRI (m)Terrain
0 – 30 Flat or nearly flat
30 – 90 Gently undulating / low relief
90 – 200 Moderately rugged terrain
> 200 Highly rugged / mountainous

الحدود تقريبية وبتختلف حسب مقياس الخريطة ودقة الـ DEM. المهم هو المقارنة النسبية بين الأحواض أو الوحدات الطبوغرافية داخل نفس الدراسة.

Main Applications

  • Characterising terrain roughness in geomorphology.
  • Habitat suitability and biodiversity studies (جبال/أودية…)
  • Assessing landslide and erosion susceptibility.
  • تحليل سهولة الحركة (accessibility) وبناء نماذج ملاءمة الطرق.

2. Data & DEM Sources

Global DEMs

  • SRTM 30 m: USGS/SRTMGL1_003 (بين ±60° تقريبًا)
  • MERIT / ALOS / COP DEM: بدائل بدقة مختلفة حسب المنطقة.

Resolution & Window Size

  • TRI حساس لدقة الـ DEM – كلما كانت الخلية أدق زاد التفصيل.
  • عادةً يستخدم نافذة 3×3 أو 5×5 للخلايا لحساب الوعورة.

Best Practices

  • Fill sinks / pits في الـ DEM قبل اشتقاق TRI لو أمكن.
  • استخدم نفس الـ DEM لكل المؤشرات الطبوغرافية (slope, aspect, TWI…)
  • طبّق قناع للبحار والبحيرات إذا كانت موجودة في الـ DEM.

Suggested Palette

[ "#020617", "#0f172a", "#1e293b", "#22c55e", "#a3e635", "#facc15", "#f97316" ]

3. Google Earth Engine Code – TRI from SRTM DEM

// TRI – Topographic Ruggedness Index from SRTM DEM
// Example using SRTM: USGS/SRTMGL1_003
// Here we use ee.Terrain.products() and the 'roughness' band,
// which is equivalent to a Riley-style TRI (max-min in 3x3 window).

var roi = geometry;   // Draw AOI as 'geometry'
Map.centerObject(roi, 9);

// 1. Load SRTM DEM (30 m)
var dem = ee.Image("USGS/SRTMGL1_003")
  .select("elevation")
  .clip(roi);

// 2. Compute terrain products (slope, aspect, roughness…)
var terrain = ee.Terrain.products(dem);

// 'roughness' ≈ TRI (difference between max and min elevation in 3x3)
var tri = terrain.select("roughness").rename("TRI");

// 3. Visualization
var vis = {
  min: 0,
  max: 300,   // adjust depending on relief of your area
  palette: ["#020617","#0f172a","#1e293b","#22c55e","#a3e635","#facc15","#f97316"]
};

Map.addLayer(dem, {min:0, max:3000, palette:["#0f172a","#22c55e","#facc15","#f97316"]}, "DEM");
Map.addLayer(tri, vis, "Topographic Ruggedness Index (TRI)");

// 4. Optional: classify TRI into terrain classes
var flat      = tri.lt(30);
var gentle    = tri.gte(30).and(tri.lt(90));
var moderate  = tri.gte(90).and(tri.lt(200));
var rugged    = tri.gte(200);

var triClasses = ee.Image(0)
  .where(flat, 1)
  .where(gentle, 2)
  .where(moderate, 3)
  .where(rugged, 4)
  .updateMask(tri.gt(0));

var triPalette = ["#0f172a", "#22c55e", "#a3e635", "#facc15", "#f97316"];

Map.addLayer(
  triClasses,
  {min:1, max:4, palette: triPalette.slice(1)},
  "TRI classes (1–4)",
  false
);

// 5. Export TRI as GeoTIFF
Export.image.toDrive({
  image: tri,
  description: "TRI_SRTM_30m",
  fileNamePrefix: "TRI_SRTM_30m",
  region: roi,
  scale: 30,
  crs: "EPSG:4326",
  maxPixels: 1e13
});